得到当前Worker
进程的编号,包括Task
进程。
int $server->worker_id;
这个属性与onWorkerStart
时的$worker_id
是相同的。
Worker
进程编号范围是[0, $serv->setting['worker_num']]
Task
进程编号范围是[$serv->setting['worker_num'], $serv->setting['worker_num'] + $serv->setting['task_worker_num']]
工作进程重启后
worker_id
的值是不变的